package com.sikaryofficial.system.api;

import com.sikaryofficial.common.core.constant.SecurityConstants;
import com.sikaryofficial.common.core.constant.ServiceNameConstants;
import com.sikaryofficial.common.core.domain.R;
import com.sikaryofficial.system.api.factory.RemotePointBalanceFallbackFactory;
import com.sikaryofficial.system.api.model.ScanRegisterVO;
import com.sikaryofficial.system.api.model.ScanTaskVO;
import com.sikaryofficial.system.api.model.UserPointResultVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * 用户服务
 * 
 * @author qinjinyuan
 */
@FeignClient(contextId = "remotePointBalanceService", value = ServiceNameConstants.BACKEND_SERVICE, fallbackFactory = RemotePointBalanceFallbackFactory.class)
public interface RemotePointBalanceService
{
    /**
     * 扫码注册信息
     *
     * @param scanRegisterVO 用户信息
     * @param brand 品牌
     * @return 结果
     */
    @PostMapping("/pointsBalance/scanRegister")
    R<Boolean> scanRegister(@RequestBody ScanRegisterVO scanRegisterVO, @RequestHeader(SecurityConstants.BRAND_KEY) String brand);

    /**
     * 扫码任务信息
     *
     * @param scanTaskVO
     * @return
     */
    @PostMapping("/pointsBalance/scanTask")
    R<UserPointResultVO> scanTask(@RequestBody ScanTaskVO scanTaskVO);

    /**
     * reset  Unused points email
     *
     * @return 结果
     */
    @GetMapping("/pointsBalance/autoSendResetEmailNotice")
    R<Boolean> autoSendResetEmailNotice();

    /**
     * Unused points
     *
     * @return 结果
     */
    @GetMapping("/pointsBalance/autoResetUnusedPoints")
    R<Boolean> autoResetUnusedPoints();

}
